﻿@model Admin.Models.TblHotel
@using MvcSiteMapProvider;
@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>
@Html.MvcSiteMap().SiteMapPath()
@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>@Html.DisplayFor(model => model.HotelName)</legend>

        <div class="editor-label" style="display: none;">
            @Html.LabelFor(model => model.HotelID)
        </div>
        <div class="editor-field" style="display: none;">
            @Html.EditorFor(model => model.HotelID)
            @Html.ValidationMessageFor(model => model.HotelID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.HotelName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.HotelName)
            @Html.ValidationMessageFor(model => model.HotelName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LinkImage)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LinkImage, new { @class = "ImageThumnail" })
            <a href="javascript:;" class="btn btn-setting">Chọn</a>
            @if (!string.IsNullOrEmpty(Model.LinkImage.ToString()))
            { <div class="editor-field">
                <img src="@Model.LinkImage.ToString()" style="width:300px;" />
            </div>
            }
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Summary)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Summary, new { Style = "width:99%;height:100px;resize:none;" })
            @Html.ValidationMessageFor(model => model.Summary)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Description, new { @class = "cleditor", Style = "width:99%;height:100px;resize:none;" })
            @Html.ValidationMessageFor(model => model.Description)

        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.StarRating)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.StarRating)
            @Html.ValidationMessageFor(model => model.StarRating)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.NumberOfRooms)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.NumberOfRooms)
            @Html.ValidationMessageFor(model => model.NumberOfRooms)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CountryID, "TblCountry")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CountryID", String.Empty)
            @Html.ValidationMessageFor(model => model.CountryID)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ProvinceID)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ProvinceID)
            @Html.ValidationMessageFor(model => model.ProvinceID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CityID, "TblCity")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CityID", String.Empty)
            @Html.ValidationMessageFor(model => model.CityID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TypeOfAccommodation)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TypeOfAccommodation)
            @Html.ValidationMessageFor(model => model.TypeOfAccommodation)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StreetAddress)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.StreetAddress)
            @Html.ValidationMessageFor(model => model.StreetAddress)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.MainPhone)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MainPhone)
            @Html.ValidationMessageFor(model => model.MainPhone)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ContactNameID, "TblUserProfile")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ContactNameID", String.Empty)
            @Html.ValidationMessageFor(model => model.ContactNameID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsActive)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsActive)
            @Html.ValidationMessageFor(model => model.IsActive)
        </div>



        <div class="editor-label">
            @Html.LabelFor(model => model.Longtitue)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Longtitue)
            @Html.ValidationMessageFor(model => model.Longtitue)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Latitue)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Latitue)
            @Html.ValidationMessageFor(model => model.Latitue)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
  
}

@Html.Partial("FileManager");

<div class="modal hide fade" id="myModal">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">×</button>
        <h3>Settings</h3>
    </div>
    <div class="modal-body">
        
    </div>
    <div class="modal-footer">
        <a href="#" class="btn" data-dismiss="modal">Close</a>
        <a href="#" class="btn btn-primary">Save changes</a>
    </div>
</div>

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
